/**
 * Created by Administrator on 2018/8/31.
 */
getParams = function(obj){
    var params = {};
    var chk = {},s;
    $(obj).each(function(){
        if($(this)[0].type=='hidden'|| $(this)[0].type=='email' || $(this)[0].type=='number' || $(this)[0].type=='tel' || $(this)[0].type=='password' || $(this)[0].type=='select-one' || $(this)[0].type=='textarea' || $(this)[0].type=='text'){
            params[$(this).attr('id')] = $.trim($(this).val());
        }else if($(this)[0].type=='radio'){
            if($(this).attr('name')){
                params[$(this).attr('name')] = $('input[name='+$(this).attr('name')+']:checked').val();
            }
        }else if($(this)[0].type=='checkbox'){
            if($(this).attr('name') && !chk[$(this).attr('name')]){
                s = [];
                chk[$(this).attr('name')] = 1;
                $('input[name='+$(this).attr('name')+']:checked').each(function(){
                    s.push($(this).val());
                });
                params[$(this).attr('name')] = s.join(',');
            }
        }
    });
    chk=null,s=null;
    return params;
}
